#include <stdio.h>
main()
{	   	  	       
    char str[80], *p = str, *q, max;

    gets(p);
    max = *(p++);

    while (*p != 0)
    {	   	  	       
        if (max < *p)
        {	   	  	       
            max = *p;
            q = p;
        }
        p++;
    }

    p = q;

    while (p > str)
    {	   	  	       
        *p = *(p - 1);
        p--;
    }

    *p = max;
    puts(p);
}	   	  	       
